﻿using FB.Membership;
using FB.Membership.Principal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace FB.Mvc
{
    public class WebViewPageBase : System.Web.Mvc.WebViewPage
    {
        public virtual new FBPrincipal User
        {
            get
            {
                var u = base.User as FBPrincipal;
                return u == null ? new FBPrincipal() : u;
            }
        }

        public virtual new FBProfile Profile
        {
            get { return base.Profile as FBProfile; }
        }

        public override void Execute()
        {
            throw new NotImplementedException();
        }
    }


    public abstract class WebViewPageBase<TModel> : System.Web.Mvc.WebViewPage<TModel>
    {
        public virtual new FBPrincipal User
        {
            get
            {
                var u = base.User as FBPrincipal;
                return u == null ? new FBPrincipal() : u;
            }
        }

        public virtual new FBProfile Profile
        {
            get { return base.Profile as FBProfile; }
        }

    }
}
